package vn.edu.saigontech.ncms.model.result;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@DiscriminatorValue("second_final_test")
@SuppressWarnings("serial")
public class SecondTest extends AbstractTest {
	
	@Temporal(TemporalType.DATE)
	@Column(name = "second_spoken_date")
	private Date secondSpokenDate;

	@Temporal(TemporalType.DATE)
	@Column(name = "second_written_date")
	private Date secondWrittenDate;

	// to check whether all grade has been input
	public boolean isAllGradeInput() {
		boolean ret = true;
		if (listening == null || grammar == null || speaking == null
				|| reading == null || writing == null) {
			ret = false;
		}
		return ret;
	}

	public Date getSecondSpokenDate() {
		return secondSpokenDate;
	}

	public void setSecondSpokenDate(Date secondSpokenDate) {
		this.secondSpokenDate = secondSpokenDate;
	}

	public Date getSecondWrittenDate() {
		return secondWrittenDate;
	}

	public void setSecondWrittenDate(Date secondWrittenDate) {
		this.secondWrittenDate = secondWrittenDate;
	}
}